﻿{% extends '../../layout.html' %}
<!-- header-start -->
{% block head %}
{% parent %}

<!--lCalendar.css-->
<link href="/component/lCalendar/lCalendar.css" rel="stylesheet"/>
<!--LArea.css-->
<link href="/component/LArea/LArea.min.css" rel="stylesheet"/>
{% endblock %}
<!-- header-end -->

<!-- body-start -->
{% block content %}
<div class="Hr_BindProduct">
    <div class="return_my_haier">
        <a href="javascript:void(0)" onclick="history.go(-1)">
            <div class="Return">
                <img src="/images/icon/left.png"/>
            </div>
        </a>
    </div>
    <main>
        {#name= "myform"#}
        {#enctype="multipart/form-data"#}
        {#method = 'post'#}
        {#action = '/request-conv/index.php?m=BindProduct&a=bind'#}
        <form id="uploadForm"
              class="fields" >
            <input id="u_id" class="field-text" type="hidden" name="u_id" value="{{ thatData.u_id}}"/>
            <div class="field">
                <label>商品编码<sup>*</sup></label>
                <input id="p_id" class="field-text" type="text" name="p_id" value="{{ thatData.tm}}"/>
            </div>
            <div class="field">
                <label>购买时间<sup>*</sup></label>
                <input id="PruchaseTime" type="text" readonly="readonly" name="pu_purchase" placeholder="请选择购买日期"
                       data-lcalendar="2015-01-01,2115-01-01">
            </div>
            <div class="field">
                <label>购买城市<sup>*</sup></label>
                <input id="PruchaseCity" type="text" name="pu_land" placeholder="请选择购买城市" readonly="readonly">
                <input id="PruchaseCity_value1" type="hidden" value="20,234,504" readonly="readonly"/>
            </div>
            <div class="field">
                <label>购买渠道<sup>*</sup></label>
                <div class="Hidden-Select">
                    <select id="PruchaseFun" type="text" name="pu_channel" placeholder="请选择购买渠道">
                        <option value="1">门店</option>
                        <option value="2">网购</option>
                    </select>
                </div>
            </div>
            <div class="field">
                <label>购买价格<sup>*</sup></label>
                <input id="PruchasePrice" type="number" name="pu_price" placeholder="请输入购买价格">
            </div>
            <div class="field last-field">
                <label>推荐人<sup></sup></label>
                <input id="Referee" type="number" name="pu_referee" placeholder="请输入推荐人的手机号码" maxlength="11">
            </div>
            {#<div class="field last-field">#}
                {#<label>购机人<sup></sup></label>#}
                {#<input id="Placehold" type="number" name="pu_placehold" placeholder="请输入购机人手机号码" maxlength="11">#}
            {#</div>#}
            <div class="field last-field align-center flex-dir-row" id="file_a">
                <label class="pb_0">上传发票</label>
                <a href="javascript:void(0)" class="file">
                    上传图片
                    <input name="c_pic" id="c_pic" title="支持jpg、jpeg、gif、png格式，文件小于5M" type="file">
                </a>
                <span id="file_img"></span>
            </div>
            <div>
                <input id="post" class="login login-btn" name="submit" value="提交" type="submit" />
            </div>
        </form>
    </main>
</div>

{% endblock %}
<!-- body-end -->
<!-- script-start -->
{% block script %}
    <!--lCalendar.js-->
    <script type="text/javascript" src="/component/lCalendar/lCalendar.min.js"></script>
    <!--LArea.js-->
    <script type="text/javascript" src="/component/LArea/LArea.min.js"></script>
    <!--LArea.Date-->
    <script type="text/javascript" src="/component/lCalendar/LAreaData1.js"></script>
    <script type="text/javascript" src="/js/base/app.js"></script>
    <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery.form/3.51/jquery.form.min.js"></script>
    <script type="text/javascript" src="/js/my-haier/bind-product.js"></script>
<script type="text/javascript">
    //时间控件lCalendar
    $(function () {
        var calendar = new lCalendar();
        calendar.init({
            'trigger': '#PruchaseTime',
            'type': 'date'
        });

        //地址控件
        var area1 = new LArea();
        area1.init({
            'trigger': '#PruchaseCity', //触发选择控件的文本框，同时选择完毕后name属性输出到该位置
            'valueTo': '#PruchaseCity_value1', //选择完毕后id属性输出到该位置
            'keys': {
                id: 'id',
                name: 'name'
            }, //绑定数据源相关字段 id对应valueTo的value属性输出 name对应trigger的value属性输出
            'type': 1, //数据源类型
            'data': LAreaData //数据源
        });
        area1.value = [1, 13, 3];//控制初始位置，注意：该方法并不会影响到input的value

    });
</script>
{% endblock %}
<!-- script-end -->

